<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="RunOne.aspx.vb" Inherits="RunOne" title="Scrape Date" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <asp:SqlDataSource ID="SqlVendors" runat="server" ConnectionString="<%$ ConnectionStrings:VendorStatsConnectionString %>" SelectCommand="SELECT [VendorId], [Name] FROM [Vendors] WHERE ([Scraper] IS NOT NULL) ORDER BY [Name]"></asp:SqlDataSource>
  <asp:SqlDataSource ID="SqlColleges" runat="server" ConnectionString="<%$ ConnectionStrings:VendorStatsConnectionString %>"
    SelectCommand="SELECT Colleges.CollegeId, Colleges.ShortName FROM Colleges INNER JOIN LoginInformation ON Colleges.CollegeId = LoginInformation.CollegeId WHERE (LoginInformation.VendorId = @VendorId) GROUP BY Colleges.ShortName, Colleges.CollegeId ORDER BY Colleges.CollegeId">
    <SelectParameters>
      <asp:ControlParameter ControlID="ddlVendors" Name="VendorId" PropertyName="SelectedValue" />
    </SelectParameters>
  </asp:SqlDataSource>
  <br />
  <asp:DropDownList ID="ddlVendors" runat="server" AutoPostBack="True" DataSourceID="SqlVendors"
    DataTextField="Name" DataValueField="VendorId" Width="163px">
  </asp:DropDownList>
  Start
  <asp:DropDownList ID="ddlColleges" runat="server" DataSourceID="SqlColleges" DataTextField="ShortName"
    DataValueField="CollegeId" Width="169px">
  </asp:DropDownList>
  thru
  <asp:DropDownList ID="ddlCollegeThru" runat="server" DataSourceID="SqlColleges" DataTextField="ShortName"
    DataValueField="CollegeId" Width="169px">
  </asp:DropDownList>Start
  <asp:DropDownList ID="ddlStartDate" runat="server" Width="94px">
  </asp:DropDownList>End
  <asp:DropDownList ID="ddlEndDate" runat="server" Width="94px">
  </asp:DropDownList>
  <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="ddlStartDate"
    ControlToValidate="ddlEndDate" ErrorMessage="Start date must be before end date"
    Operator="GreaterThanEqual" Type="Date"></asp:CompareValidator><br />
  <br />
  <asp:Button ID="Button1" runat="server" Text="Download Data" />
</asp:Content>

